Update code with required functionality