created initial version of library functions