separated functions into modules