move implementation of methods to c-file