modified the answer on interview question blog