better function migrations