less code, still passes tests