fixed bug in main
hope this merge worked