Moving function to the common command.