devided implementation to bottom of .h