solutions for javascripting