Changed switch statement to if-else
New method of adding appcompat