added back in GraphicsLayer constructor, replaced if statement