better way of setting score