split javascript into 3 files