all functions tested with user input