Updated main - incomplete