separated leap into js file