updated accoring to comments