fix long standing bug / use switch~  instead of dynamic creation
fix bug with phase not working