cleaning up the old code