transform to domain 0-1