lots ofbug fix and readme update