removed javascript into new file