readded r optimization
changed espacing