updated for online SLAM