minor change: moved algorithm type to the end of params