Added comments and updated getPos