Added check for valid outputs
Merge branch 'master' of github.com:ljhffmn/testing_code