debugged a little, waiting to test on device