Added function
get_last_id() function