added write/clear commands