the functions' code, ready for submission