fixed a bug if position was nonsense, and added toupper functinality