modified to work on android