added type checking
merging branches
added type checking