works as module and bin