redone main!