exchanged hacky stack code against standard bind mechanism