working correcty somehow but dirty code