removed groupDecleration code, refactored parts and added error checks, finished most of singleDecleration flow