simplification of code