modyfing from tanky
addding from another commit from tanky