Fully implemented prev - reduced to a generic case.