Add extractById(), a solution for memory issue