solved 3 functions