first full implementaiton