Added basic functions and structue