added basic input handling