initial commit with complete functions