updated logick and readme