function homework assignment