adds actual functionality

not quite working yet