use functions instead of directly setting status