fixed it to understand how it works