fixed firing exceptions because of not-included coord function
moved cood function to the bottom (may be it's not so good decision)