Reverting the commit 5c6f38d885389048e5e0925eaba29c581142fa23 due to issues identified in the previous implementation.