modified for eclipse