working before size.height - d.y