Added functions for getting data instead of just printing.