tried new approach and added comments