cleaning up, minimizing code