working on more elegant solutions