refactored for add and find