first draft of get_last