handles edge cases
adds space between input + error message
adds autofocus
splits logic into separate fx's