converted over my code to android