improved tests comments and code