small collection of different js functions