cleaning up the implementation