added further functionality, work in progress