mostly working
bugfix