Two functions instead of magic parameter?