attempt at solving errors