Need to check for invalid input. Everything else should be done.