Rewritted master, but is not working as excepted