changed $test variable to receive input