using an optimized version of bind