Neat solution to earlier problem !