js in a separated file
changes accordingly to new file structure