working main.