main is finally working