fixed register, api doesn't seem to work though