updated readme; fix external scope issue