updated code and readme