merged Alex's changes