implemented some sacurity