progress on functions, i guess