add makefile
simplify api