debugging version. not working