first input processing sucked, rewriting it