More functional js practice, not much cheat in