some changes, better interface