made many more functions into modules