separated functions into new source file