added my solution to the problem and a sample usage session