Shadow implementation (with bugs)