moving implementation into the library
remaining