modified code for interface change