input length check added

here's the first update that includes a simple character count check.. I'll probably change a few more things here and there but it should work so far.