Use status instead of magic number