fixed a couple bugs, updated version