made a bit more dynamic