Better Algorithm