code functions and add text to readme.md