bug fixes, actually works now