function POST working at register