adapted to run on eclipse