functionizes the 2-way bind logic