[~BUGFIX] fixed fatal error because function declared twice