wip - implemented begin_with but need to optimize