updated to fix a few issues