improve runtime & input