binstubs function