fill in functions and add libraries