added if conditions for check user data in ram