Refactoring read command