added console code