Adjusted my implementation