An introduction to computer science for non-majors using principles of computation