input testing
refactor