.
added more checks