changed code for 2 files