some basic functional js