cleaner way of handling tab hooks