finally working... but not a clean solution