Based on Michael's core implementation.
Based on Michael's core implementation.