refactored for factory design pattern
Merge branch 'master' of https://github.com/xinyichen/CS-2340-Project