making code more efficient