fixed calculating marks