simplyfy code