proper ram calculation