updated code, added edit and css