refactored getting binding stuff