add last_seen functionality