fix #4 added class and test code
close #4 updated makefile dependency