Make custom ID binding more flexible