refactor the input layer for testing. build first test that actually simulate typing