all functions are almost done!