make makefile more automatic for easy testing and update readme accordingly