cleaning up redundant code