remove a large swath of copypasted code