updates

more logic
sync to phone code