Implmeneted fork logic