removed unnecesary code which could raise error