code changed with respect to new file structure