better solution

better solution