some redundancy changes made here