rest of it implemented