Using external functions for data input