Updated according to comments