added switch statement error handling, default vals