made position depend on pos_x and pos_y instead of sprite.x and sprite.y