added SECURE and LOCAL
almost everything working...