refactors fall function