implemented status check rather than string check for speed