Implemented Alex's suggestion