add blocks code