modify to have better interface