removed unncessary if block