Updated with optimist library.