fixed part of code