Basic first implementation of required functionality. Currently untested