with SLM and without if