refactor code; next answer challenge questions