took out uneccesary nil checks