modified according to the comment