fix wrong spacing, and add docblocks