Added a_in and b_in as parameters