refacto engine + adding security + protecting config for role admin only