updated detector for 640x360 dimensions