fixed issues, added write commands and position setting test