First commit, main functions added