get rid of loop. some data type changes.