bugs fixed from last commit, everything working