Basic working code and test