my lightly modified version of bullet