removes global current_id and rewrites get_current_id to return id