removing all unecessary casting