modify happy day ea

formating, remove duplicated code