removed irrelevent code