public void addToManager(int workerId, int managerId) {
        boolean workerExists = false;
        boolean managerExists = false;
        Employee manager = null;
        for (Employee employee : staff) {
            if (employee.getId() == workerId) {
                workerExists = true;
            }
            if (employee.getId() == managerId && employee.getPost() instanceof Manager) {
                managerExists = true;
                manager = employee;
            }
        }
        if (workerExists && managerExists) {

            ((Manager)manager.getPost()).addWorker(workerId);
            logger.info("Employee id: " + workerId + " was added to manager id: " + managerId);
            prepareToWrite();
        } else {
            if (!workerExists) {
                logger.error("Worker with id: " + workerId + "not found");
            }
            if (!managerExists) {
                logger.error("Manager with id: " + managerId + "not found");
            }
            return;
        }
    }