Optimizing this further