updated code and readme file