copied file from previous project. Added basic functions