moving implementation to one file