working version with status