cleaned up code even more