added main, decrypt function