generalize this like you said in the add view