Temporary code. It works but need to clean up