It seems like the bottom half of this function is repeated. Perhaps the subclasses can just implement the top half?