fixing pretesting bugs