Updated with best code.