Modified according to the comments