solved issues and add main