bug fixed, improvement in reading files, generating newPoses file