Fixed cross dependancy. Working version