seperated up functions.c