add status logic