separate working and error raising methods