rewritten core logic from scratch, now with protected entity that contains the status