updated to be Android compatible