added replicate input feature