better stub generation