separated test driver from class, finished all basic functions