added error cases, readme, makefile