Created method update_pregnancy and refactored other method