code polished and readme updated