moving everything into js