Credit @sabas for awesome contributions, thanks!