improved code and readme changes