started working on some basic functions