Re-written with methods.