fixed a bug -- works now