slight potential bug and whitespace