small simplification of code