Added code to actually make it work