few changes regarding NicolasLM suggestion