seperated JS from views