extract
ugly spagetti for gettin title