whitespace formatting and separate method to get callbacks for a given event