add bindData method to bind data function to controller