added command reading