working on semantic checking. Redesigning almost everything