working on randy's problem