better solution for 10