fix bug and add comments + design update