bugfixes, change directions to enum