now works perfectly, to add functionality