added the logic and procedures blocks