Modified the hackerrank part