updated code, in development