more optimized

learned a trick from sha-lite