simplified, removed junk