Basic working
Better main program