added if-already-drawn checking, but still doesn't work as i would like it to