cleaning up implementation