add checks, constraints and fix pep8 cols limit