Added contional statements for binding.