fixed draw algo