Simplfy code