Added base func for lab2