Splitting up the functions