Implemenet structure & basic logic