added basic coordinates check