turns numbers to works using javascript