basic input written. needs unit testing