added further scoping declarations, need to create a hoist