got angular directives working but still buggy