correct get_last_modified function