Fixed non-working implementation