working on service def