Implemented buggy code