Added better extraction method