returned error to self coded method