updated tests and added a self-defined class -- not file for this program, but helpful for learning purpose