make get_last_modified function more understandable