Added the checkpos method