fix patch, moved to main class