moved functionality to header/src files