worked on definition function, realised there are some bugs in the constant_set and/or constant_expression function, fixing those again