changed generator and main