cleaned up code from merge