main modified