fully functional program, added sample data