now its working, needs to work better with input types. needs tests
small change