making functions and stuff