refactor for proper add