some scala utils