first commit.  TODO: debug and comment