added switchcase and more