returning status as int