Changing the js behaviour to fit our needs