Fix copy paste to make more generic