made #of threads as input argument. Added readme file