Try to write my own js library