Created new implementation for stage 2